-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix console completion selection on HTML5 #3225
Conversation
@@ -37,8 +36,6 @@ class CompletionList extends Sprite | |||
createPopupEntries(capacity); | |||
createScrollBar(); | |||
updateSelectedItem(); | |||
|
|||
FlxG.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why this wasn't working? Is this a preventDefault
issue? or is the console blocking these events somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure, I believe it's not console or FlxG.stage
specific, since Lib.current.addEventListener
also doesn't register tab key, and also the autofocus event listener doesn't work either ("Press TAB to focus the console!") in HTML5. It could be a preventDefault
thing!
307b431
to
8efe1c4
Compare
revert formatting
8efe1c4
to
e3e01fe
Compare
Thanks, if we figure out what's blocking events we can revisit this |
On HTML5,
FlxG.stage.addEventListener
seems to not properly do the keyboard events for the CompletionList.This PR changes it so that
onKeyDown
is passed through from the debug consoles input event listeners, so using the arrow keys to move through the completions now works on HTML5 properly